<?php
namespace app\admin\controller;
use think\Controller;

class Common extends Controller
{
    public function _initialize(){
    	if(!session('username')){
    		$this->error('您尚未登录系统',url('Login/index'));
    	}
    }

    /**
	 * 退出登录
	 * @return [int] [退出成功]
	 */
	public function logout(){
		session(null);
		$this->success('退出成功',url('Login/index'));	//退出成功
	}
}
